package com.captjack.common.util.io;

import java.io.Closeable;
import java.io.IOException;

/**
 * Description description.....
 *
 * @author Jack Sparrow
 * @version 1.0.0
 * @date 2018/5/15 00:17
 * package com.captjack.common.util.io
 */
public final class IoCommonUtil {

    /**
     * 关闭流
     *
     * @param closeables 待关闭的流
     */
    public static void closeStream(Closeable... closeables) {
        for (Closeable closeable : closeables) {
            if (closeable != null) {
                try {
                    closeable.close();
                } catch (IOException e) {
                    closeable = null;
                }
            }
        }
    }

}
